package com.hankol.community.adapter

import android.app.Activity
import android.view.View
import android.widget.TextView
import androidx.core.content.ContextCompat
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.hankol.community.R
import com.hankol.community.bean.DoyTypeData


/**
 * @author: 关忆北、
 * @date: 2022/4/20
 * @Des：
 */
class TopicMenuAdapter : BaseQuickAdapter<DoyTypeData.DataBean, BaseViewHolder>(R.layout.item_topic_men) {
    override fun convert(helper: BaseViewHolder, item: DoyTypeData.DataBean) {
        val mTvTopicMenText = helper.getView<TextView>(R.id.tv_topic_men_text)
        val mViewTopicMen = helper.getView<View>(R.id.view_topic_men)
        mTvTopicMenText.text = item.name
        if (item.isSelect) {
            mTvTopicMenText.setTextColor(ContextCompat.getColor(mContext, R.color.color_333333))
            mTvTopicMenText.paint.isFakeBoldText = true
            mTvTopicMenText.textSize = 18f
            mViewTopicMen.visibility = View.VISIBLE

        } else {
            mTvTopicMenText.setTextColor(ContextCompat.getColor(mContext, R.color.color_999999))
            mTvTopicMenText.paint.isFakeBoldText = false
            mTvTopicMenText.textSize = 16f
            mViewTopicMen.visibility = View.GONE
        }
    }


}